package org.jeecg.modules.backstageModule.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.jeecg.modules.PriceSystemModule.entity.PriceInervalEntity;
import org.jeecg.modules.backstageModule.entity.CategoryTechnologyEntity;
import org.jeecg.modules.backstageModule.entity.DiscountEntity;
import org.jeecg.modules.backstageModule.entity.FabricGroupEntity;

import java.util.HashMap;
import java.util.List;

public interface DiscountService {
    IPage<DiscountEntity> getCustDiscountList(Page<DiscountEntity> page, String discountSystemName);

    int setDiscount(String userId, String discount, String discountObject, String discountType);


    //获取有客户一年消费字段的列表
    IPage<DiscountEntity> getCustxiaofeiList(Page<DiscountEntity> page);

    int adddiscountSystem(DiscountEntity entity);

    //查询设置折扣中的品类工艺折扣列表
    IPage<CategoryTechnologyEntity> getSetdiscountList(Page<CategoryTechnologyEntity> page, String discountId, Integer category, Integer orderType);

    //查询折扣用户列表
    IPage<DiscountEntity> getDiscountCustomers(Page<DiscountEntity> page, String companyName, String companyCode, String discountId);

    //删除用户折扣
    int deleteCustomerDiscount(int id);

    //将用户添加到这个用户折扣下
    int addUsertoDiscount(int userId, String discountId);

    int shezhizhekou(Object id, Object discountRatio, Object discountId);

    //查询所有的品类
    List<HashMap<String, Object>> getallcategory();

    IPage<CategoryTechnologyEntity> getmianliaodiscountsystemList(Page<CategoryTechnologyEntity> page, String discountId, String fabricDiscountSystemName);

    List<PriceInervalEntity> getmianliaojietidiscountlist(String fabirDiscountSystemId);

    //查询一下这个区间的面料阶梯折扣是否已经设置
    String getoldjieti(String fabirDiscountSystemId, int minNumbers, int maxNumbers);

    //添加一条面料阶梯折扣数据
    int addfabicDiscountjieti(PriceInervalEntity entity);

    //删除这条面料阶梯折扣数据
    int deletemianliaojieti(int id);

    //查询所有的面料组
    IPage<FabricGroupEntity> getallmianliaogroup(Page<FabricGroupEntity> page, String groupName);

    //将这个面料组添加到这个面料折扣体系下面
    int addgrouptodiscountsystem(Integer integer, Integer fabirDiscountSystemId, String discountId);

    //添加一个面料折扣体系
    int addmiantiaoDiscountSystem(CategoryTechnologyEntity entity);

    //删除面料折扣体系
    int deleteFabricDiscountSystembyId(int id);

    IPage<DiscountEntity> getfabricGroupDiscountbyDiscountId(Page<DiscountEntity> page, String id, String groupName, String groupCode);

    int updateFabricGroupDiscount(Object id, Object discountRatio);

    DiscountEntity getdiscountSystemdetail(String id);

    int updatediscountSystem(DiscountEntity entity);


    int deletediscountSystem(String id);
}
